﻿Gnc.monthSelect = function () {
    Gnc.monthSelect.superclass.constructor.call(this);
    var data = [
        { "value": "","text": "全部" },
        { "value": "1", "text": "1" },
        { "value": "2", "text": "2" },
        { "value": "3", "text": "3" },
        { "value": "4", "text": "4" },
        { "value": "5", "text": "5" },
        { "value": "6", "text": "6" },
        { "value": "7", "text": "7" },
        { "value": "8", "text": "8" },
        { "value": "9", "text": "9" },
        { "value": "10", "text": "10" },
        { "value": "11", "text": "11" },
        { "value": "12", "text": "12" }
    ];
    this.set({
        border: 1,
        emptyText: '请选择...',
        valueField:'value',
        showNullItem:false,
        data:data,
        //nullItemText:'全部',
        textField:'text'
    });
};
mini.extend(Gnc.monthSelect, mini.ComboBox, {
    uiCls: "gnc-monthselect",
    selectedItem: null,
    autoLoad: false,
    _create: function () {
        Gnc.monthSelect.superclass._create.call(this);
         this.on('valuechanged',function(record){
            this.selectedItem = record.selected;
            this.fire('monthSelected',this.selectedItem);
        },this);
    },
    setNameValue:function(name,value)
    {
        this.setValue(value);
        this.setText(name);
    }
});
mini.regClass(Gnc.monthSelect, "Gnc.monthSelect");